<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*
    三元运算符：
        条件?满足条件执行的代码：不满足条件执行的代码
        三元运算符一般用来取值
    */
    let age = 18
    let res = age >= 18 ? "true" : "false"
    console.log(res)
</script>
</body>
</html>